Skip to content

QVAC-20837 fix: register built-in plugins for Bare examples; clarify Bare docs and error#2640

Merged
opaninakuffo merged 4 commits into
tetherto:mainfrom
opaninakuffo:fix-bare-example-plugin-registration
Jun 18, 2026
Merged

QVAC-20837 fix: register built-in plugins for Bare examples; clarify Bare docs and error#2640
opaninakuffo merged 4 commits into
tetherto:mainfrom
opaninakuffo:fix-bare-example-plugin-registration

Conversation

@opaninakuffo

Copy link
Copy Markdown
Contributor

🎯 What problem does this PR solve?

  • Running SDK examples on Bare via bun run bare:example failed with WORKER_PLUGINS_NOT_REGISTERED. Bare runs in-process with no spawned worker, so (unlike Node/Expo) nothing auto-registers the built-in plugins.
  • The bare-bootstrap.js harness couldn't even run on Bare — it imported Node's process/path instead of bare-process/bare-path.
  • The WORKER_PLUGINS_NOT_REGISTERED message pointed at an unresolvable import path (@qvac/sdk/server/bare/plugins) and didn't explain the Bare-specific contract.
  • Docs didn't state that @qvac/sdk on Bare requires explicit plugin registration, nor how to tear down long-lived connections.

📝 How does it solve it?

  • bare-bootstrap.js: use bare-process/bare-path, and load the default worker entry (dist/server/worker.js) before the example so the built-in plugin set is registered (initializeWorkerCore is idempotent). Warns if the worker entry isn't built.
  • Rewrote the WORKER_PLUGINS_NOT_REGISTERED message: register via plugins([...]) / registerPlugin(...) on Bare, import each plugin from its subpath (e.g. @qvac/sdk/llamacpp-completion/plugin), and recommend @qvac/bare-sdk for direct Bare usage.
  • Docs: @qvac/sdk README clarifies Bare needs explicit registration; @qvac/bare-sdk README adds a "Connection lifecycle" section documenting close() and unloadModel({ autoClose }).

🧪 How was it tested?

  • Manually ran bun run bare:example on Bare for the affected tests and examples — plugins register and they execute successfully.

…Bare docs and error

- bare-bootstrap.js: use bare-process/bare-path; load the default worker
  entry (dist/server/worker.js) to register the built-in plugin set before
  the example runs (initializeWorkerCore is idempotent). Warn if not built.
- Rewrite WORKER_PLUGINS_NOT_REGISTERED message: register via plugins([...])
  / registerPlugin(...) on Bare, import each plugin from its subpath, and
  recommend @qvac/bare-sdk for direct Bare usage.
- Docs: @qvac/sdk README clarifies Bare needs explicit registration;
  @qvac/bare-sdk README adds a Connection lifecycle section (close(),
  unloadModel({ autoClose })).
@opaninakuffo opaninakuffo requested review from a team as code owners June 16, 2026 15:29
Comment thread packages/sdk/schemas/sdk-errors-client.ts Outdated
Comment thread packages/sdk/scripts/bare-bootstrap.js
…gistration docs

- Add "Runtime registration on Bare" section to the Plugin system page,
  distinguishing bundle-time plugin selection from runtime registration.
- Link the WORKER_PLUGINS_NOT_REGISTERED message to the new doc anchor.
Explain that the harness loads the default worker only to run the
registration-free bundled examples (the @qvac/sdk "full defaults" path),
and that explicit/selective assembly is @qvac/bare-sdk's model.
@opaninakuffo

Copy link
Copy Markdown
Contributor Author

review

@github-actions

Copy link
Copy Markdown
Contributor

Tier-based Approval Status

**PR Tier:** TIER1

**Current Status:** ✅ APPROVED

**Requirements:**
- 1 Team Member approval ✅ (2/1)
- 1 Team Lead OR Management approval ✅ (1/1)



---
*This comment is automatically updated when reviews change.*

@opaninakuffo opaninakuffo merged commit 62604e8 into tetherto:main Jun 18, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants